(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

naiverev(Cons(x, xs)) → app(naiverev(xs), Cons(x, Nil))
app(Cons(x, xs), ys) → Cons(x, app(xs, ys))
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
naiverev(Nil) → Nil
app(Nil, ys) → ys
goal(xs) → naiverev(xs)

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

naiverev(Cons(z0, z1)) → app(naiverev(z1), Cons(z0, Nil))
naiverev(Nil) → Nil
app(Cons(z0, z1), z2) → Cons(z0, app(z1, z2))
app(Nil, z0) → z0
notEmpty(Cons(z0, z1)) → True
notEmpty(Nil) → False
goal(z0) → naiverev(z0)
Tuples:

NAIVEREV(Cons(z0, z1)) → c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1))
NAIVEREV(Nil) → c1
APP(Cons(z0, z1), z2) → c2(APP(z1, z2))
APP(Nil, z0) → c3
NOTEMPTY(Cons(z0, z1)) → c4
NOTEMPTY(Nil) → c5
GOAL(z0) → c6(NAIVEREV(z0))
S tuples:

NAIVEREV(Cons(z0, z1)) → c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1))
NAIVEREV(Nil) → c1
APP(Cons(z0, z1), z2) → c2(APP(z1, z2))
APP(Nil, z0) → c3
NOTEMPTY(Cons(z0, z1)) → c4
NOTEMPTY(Nil) → c5
GOAL(z0) → c6(NAIVEREV(z0))
K tuples:none
Defined Rule Symbols:

naiverev, app, notEmpty, goal

Defined Pair Symbols:

NAIVEREV, APP, NOTEMPTY, GOAL

Compound Symbols:

c, c1, c2, c3, c4, c5, c6

(3) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)

Removed 1 leading nodes:

GOAL(z0) → c6(NAIVEREV(z0))
Removed 4 trailing nodes:

NOTEMPTY(Cons(z0, z1)) → c4
NOTEMPTY(Nil) → c5
NAIVEREV(Nil) → c1
APP(Nil, z0) → c3

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

naiverev(Cons(z0, z1)) → app(naiverev(z1), Cons(z0, Nil))
naiverev(Nil) → Nil
app(Cons(z0, z1), z2) → Cons(z0, app(z1, z2))
app(Nil, z0) → z0
notEmpty(Cons(z0, z1)) → True
notEmpty(Nil) → False
goal(z0) → naiverev(z0)
Tuples:

NAIVEREV(Cons(z0, z1)) → c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1))
APP(Cons(z0, z1), z2) → c2(APP(z1, z2))
S tuples:

NAIVEREV(Cons(z0, z1)) → c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1))
APP(Cons(z0, z1), z2) → c2(APP(z1, z2))
K tuples:none
Defined Rule Symbols:

naiverev, app, notEmpty, goal

Defined Pair Symbols:

NAIVEREV, APP

Compound Symbols:

c, c2

(5) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

notEmpty(Cons(z0, z1)) → True
notEmpty(Nil) → False
goal(z0) → naiverev(z0)

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

naiverev(Cons(z0, z1)) → app(naiverev(z1), Cons(z0, Nil))
naiverev(Nil) → Nil
app(Cons(z0, z1), z2) → Cons(z0, app(z1, z2))
app(Nil, z0) → z0
Tuples:

NAIVEREV(Cons(z0, z1)) → c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1))
APP(Cons(z0, z1), z2) → c2(APP(z1, z2))
S tuples:

NAIVEREV(Cons(z0, z1)) → c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1))
APP(Cons(z0, z1), z2) → c2(APP(z1, z2))
K tuples:none
Defined Rule Symbols:

naiverev, app

Defined Pair Symbols:

NAIVEREV, APP

Compound Symbols:

c, c2

(7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

NAIVEREV(Cons(z0, z1)) → c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1))
We considered the (Usable) Rules:none
And the Tuples:

NAIVEREV(Cons(z0, z1)) → c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1))
APP(Cons(z0, z1), z2) → c2(APP(z1, z2))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(APP(x1, x2)) = 0   
POL(Cons(x1, x2)) = [1] + x2   
POL(NAIVEREV(x1)) = x1   
POL(Nil) = 0   
POL(app(x1, x2)) = 0   
POL(c(x1, x2)) = x1 + x2   
POL(c2(x1)) = x1   
POL(naiverev(x1)) = 0   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

naiverev(Cons(z0, z1)) → app(naiverev(z1), Cons(z0, Nil))
naiverev(Nil) → Nil
app(Cons(z0, z1), z2) → Cons(z0, app(z1, z2))
app(Nil, z0) → z0
Tuples:

NAIVEREV(Cons(z0, z1)) → c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1))
APP(Cons(z0, z1), z2) → c2(APP(z1, z2))
S tuples:

APP(Cons(z0, z1), z2) → c2(APP(z1, z2))
K tuples:

NAIVEREV(Cons(z0, z1)) → c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1))
Defined Rule Symbols:

naiverev, app

Defined Pair Symbols:

NAIVEREV, APP

Compound Symbols:

c, c2

(9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

APP(Cons(z0, z1), z2) → c2(APP(z1, z2))
We considered the (Usable) Rules:

naiverev(Nil) → Nil
naiverev(Cons(z0, z1)) → app(naiverev(z1), Cons(z0, Nil))
app(Nil, z0) → z0
app(Cons(z0, z1), z2) → Cons(z0, app(z1, z2))
And the Tuples:

NAIVEREV(Cons(z0, z1)) → c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1))
APP(Cons(z0, z1), z2) → c2(APP(z1, z2))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(APP(x1, x2)) = x1   
POL(Cons(x1, x2)) = [2] + x2   
POL(NAIVEREV(x1)) = [2]x1 + [2]x12   
POL(Nil) = 0   
POL(app(x1, x2)) = x1 + x2   
POL(c(x1, x2)) = x1 + x2   
POL(c2(x1)) = x1   
POL(naiverev(x1)) = [2]x1   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

naiverev(Cons(z0, z1)) → app(naiverev(z1), Cons(z0, Nil))
naiverev(Nil) → Nil
app(Cons(z0, z1), z2) → Cons(z0, app(z1, z2))
app(Nil, z0) → z0
Tuples:

NAIVEREV(Cons(z0, z1)) → c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1))
APP(Cons(z0, z1), z2) → c2(APP(z1, z2))
S tuples:none
K tuples:

NAIVEREV(Cons(z0, z1)) → c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1))
APP(Cons(z0, z1), z2) → c2(APP(z1, z2))
Defined Rule Symbols:

naiverev, app

Defined Pair Symbols:

NAIVEREV, APP

Compound Symbols:

c, c2

(11) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(12) BOUNDS(1, 1)